Skip to content

gh-38807: fix race condition in Lib/trace.py#110143

Merged
serhiy-storchaka merged 1 commit into
python:mainfrom
buermarc:gh-38807
Jan 17, 2024
Merged

gh-38807: fix race condition in Lib/trace.py#110143
serhiy-storchaka merged 1 commit into
python:mainfrom
buermarc:gh-38807

Conversation

@buermarc

@buermarc buermarc commented Sep 30, 2023

Copy link
Copy Markdown
Contributor

Instead of checking if a directory does not exist and thereafter creating it, directly call os.makedirs with the exist_ok kwarg.

Instead of checking if a directory does not exist and thereafter
creating it, directly call `os.makedirs` with the `exist_ok` kwarg.

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@serhiy-storchaka
serhiy-storchaka merged commit 78fcde0 into python:main Jan 17, 2024
@serhiy-storchaka serhiy-storchaka added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jan 17, 2024
@miss-islington-app

Copy link
Copy Markdown

Thanks @buermarc for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @buermarc for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 17, 2024
Instead of checking if a directory does not exist and thereafter
creating it, directly call os.makedirs() with the exist_ok=True.
(cherry picked from commit 78fcde0)

Co-authored-by: buermarc <44375277+buermarc@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jan 17, 2024
Instead of checking if a directory does not exist and thereafter
creating it, directly call os.makedirs() with the exist_ok=True.
(cherry picked from commit 78fcde0)

Co-authored-by: buermarc <44375277+buermarc@users.noreply.github.com>
@bedevere-app

bedevere-app Bot commented Jan 17, 2024

Copy link
Copy Markdown

GH-114206 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.12 only security fixes label Jan 17, 2024
@bedevere-app

bedevere-app Bot commented Jan 17, 2024

Copy link
Copy Markdown

GH-114207 is a backport of this pull request to the 3.11 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.11 only security fixes label Jan 17, 2024
serhiy-storchaka pushed a commit that referenced this pull request Jan 17, 2024
…14207)

Instead of checking if a directory does not exist and thereafter
creating it, directly call os.makedirs() with the exist_ok=True.
(cherry picked from commit 78fcde0)

Co-authored-by: buermarc <44375277+buermarc@users.noreply.github.com>
serhiy-storchaka pushed a commit that referenced this pull request Jan 17, 2024
…14206)

Instead of checking if a directory does not exist and thereafter
creating it, directly call os.makedirs() with the exist_ok=True.
(cherry picked from commit 78fcde0)

Co-authored-by: buermarc <44375277+buermarc@users.noreply.github.com>
kulikjak pushed a commit to kulikjak/cpython that referenced this pull request Jan 22, 2024
Instead of checking if a directory does not exist and thereafter
creating it, directly call os.makedirs() with the exist_ok=True.
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Instead of checking if a directory does not exist and thereafter
creating it, directly call os.makedirs() with the exist_ok=True.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Instead of checking if a directory does not exist and thereafter
creating it, directly call os.makedirs() with the exist_ok=True.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants